{config_load file="global.conf"}
{config_load file="_RateItems.conf" section="`$lang`"}

<table class="currency_rates"  id="tabl_rates" border="0" name="tabl_rates"
cellpadding="0" cellspacing="0">
	<tr class="none">
		<th width="60">{#_RateItems__labelSymbol#}{*Symbol*}</th>
		<th width="50">{#_RateItems__labelBid#}{*Bid*}</th>
		<th width="50">{#_RateItems__labelAsk#}{*Ask*}</th>
		<th width="50">{#_RateItems__labelTime#}{*Time*}</th>
		<th width="20">&nbsp;</th>
	</tr>
{foreach name=outer item=item from=$data}

    {if 1==$item.Direction}
        {assign var=classstyle value="up"}
    {elseif  -1==$item.Direction}
        {assign var=classstyle value="down"}
    {else}
        {assign var=classstyle value="none"}
    {/if}
	{assign var="fstr_rate" value="%0.`$item.decimal`f"}
   <tr height="20px;">
   <td>
        {$item.Symbol}
    </td>
    <td class="{$classstyle}">
        {$item.Bid|string_format:"`$fstr_rate`"}
    </td>
    <td class="{$classstyle}">
        {$item.Ask|string_format:"`$fstr_rate`"}
    </td>
    <td>
        <nobr>{$item.RateTime|date_format:"%I:%M %p"}</nobr>
    </td>
    <td style="padding: 1px;"> {if 1==$item.Direction}
           <img width="12" height="12" src="{#images_dir#}/rates/arrow_up.png" />
         {elseif  -1==$item.Direction}
           <img width="12" height="12" src="{#images_dir#}/rates/arrow_down.png" />
         {else}
           &nbsp;
         {/if}
    </td>
  </tr>
{/foreach}
</table>
